<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 4.2.1">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"lianyouli.gitee.io","root":"/","scheme":"Mist","version":"7.8.0","exturl":false,"sidebar":{"position":"right","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="hive查询设置，包括统计信息等以及和prometheus集成">
<meta property="og:type" content="article">
<meta property="og:title" content="hive查询和监控设置">
<meta property="og:url" content="https://lianyouli.gitee.io/IT/it-bigdata-hive-simple-query/index.html">
<meta property="og:site_name" content="联友的Blog">
<meta property="og:description" content="hive查询设置，包括统计信息等以及和prometheus集成">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://lianyouli.gitee.io/IT/it-bigdata-hive-simple-query/image-20220508091900565.png">
<meta property="og:image" content="https://lianyouli.gitee.io/IT/it-bigdata-hive-simple-query/image-20220508085646467.png">
<meta property="og:image" content="https://lianyouli.gitee.io/IT/it-bigdata-hive-simple-query/image-20220508085844122.png">
<meta property="og:image" content="https://lianyouli.gitee.io/IT/it-bigdata-hive-simple-query/image-20220508085646467.png">
<meta property="og:image" content="https://lianyouli.gitee.io/IT/it-bigdata-hive-simple-query/image-20220508091532354.png">
<meta property="og:image" content="https://lianyouli.gitee.io/IT/it-bigdata-hive-simple-query/image-20220508110523658.png">
<meta property="og:image" content="https://lianyouli.gitee.io/IT/it-bigdata-hive-simple-query/image-20220508154107035.png">
<meta property="og:image" content="https://lianyouli.gitee.io/IT/it-bigdata-hive-simple-query/image-20220508155048646.png">
<meta property="og:image" content="https://lianyouli.gitee.io/IT/it-bigdata-hive-simple-query/image-20220508155247721.png">
<meta property="article:published_time" content="2022-05-08T00:46:55.000Z">
<meta property="article:modified_time" content="2022-05-08T09:10:44.774Z">
<meta property="article:author" content="李联友">
<meta property="article:tag" content="bigdata">
<meta property="article:tag" content="hive">
<meta property="article:tag" content="query">
<meta property="article:tag" content="dml">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://lianyouli.gitee.io/IT/it-bigdata-hive-simple-query/image-20220508091900565.png">

<link rel="canonical" href="https://lianyouli.gitee.io/IT/it-bigdata-hive-simple-query/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>hive查询和监控设置 | 联友的Blog</title>
  


  <script>
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "https://hm.baidu.com/hm.js?eb9f10e46b1f09801805fc668f13d477";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>




  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

<link rel="alternate" href="/atom.xml" title="联友的Blog" type="application/atom+xml">
</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">联友的Blog</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">密涅瓦的猫头鹰在黄昏起飞</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签<span class="badge">25</span></a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类<span class="badge">8</span></a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档<span class="badge">31</span></a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://lianyouli.gitee.io/IT/it-bigdata-hive-simple-query/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/header.jpg">
      <meta itemprop="name" content="李联友">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="联友的Blog">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          hive查询和监控设置
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              

              <time title="创建时间：2022-05-08 08:46:55 / 修改时间：17:10:44" itemprop="dateCreated datePublished" datetime="2022-05-08T08:46:55+08:00">2022-05-08</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/IT/" itemprop="url" rel="index"><span itemprop="name">IT</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <blockquote>
<p>hive查询设置，包括统计信息等以及和prometheus集成</p>
</blockquote>
<a id="more"></a>

<h2 id="统计信息"><a href="#统计信息" class="headerlink" title="统计信息"></a>统计信息</h2> <img src="/IT/it-bigdata-hive-simple-query/image-20220508091900565.png" alt="image-20220508091900565" style="zoom: 33%;">

<h3 id="创建表"><a href="#创建表" class="headerlink" title="创建表"></a>创建表</h3><figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">use</span> <span class="keyword">default</span>;</span><br><span class="line"><span class="keyword">create</span> <span class="keyword">table</span> <span class="keyword">test</span> (<span class="keyword">id</span> <span class="keyword">string</span>);</span><br></pre></td></tr></table></figure>

<h3 id="插入数据"><a href="#插入数据" class="headerlink" title="插入数据"></a>插入数据</h3><figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> <span class="keyword">test</span> <span class="keyword">values</span> (<span class="string">'hello'</span>);</span><br><span class="line"><span class="keyword">insert</span> <span class="keyword">into</span> <span class="keyword">test</span> <span class="keyword">values</span> (<span class="string">'hello'</span>);</span><br></pre></td></tr></table></figure>

<h3 id="查看数据"><a href="#查看数据" class="headerlink" title="查看数据"></a>查看数据</h3><figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">select</span> * <span class="keyword">from</span> <span class="keyword">test</span>;</span><br><span class="line">+<span class="comment">----------+</span></span><br><span class="line">| test.id  |</span><br><span class="line">+<span class="comment">----------+</span></span><br><span class="line">| hello    |</span><br><span class="line">| hello    |</span><br><span class="line">+<span class="comment">----------+</span></span><br></pre></td></tr></table></figure>

<h3 id="查看统计行数"><a href="#查看统计行数" class="headerlink" title="查看统计行数"></a>查看统计行数</h3><figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">select</span> <span class="keyword">count</span>(*) <span class="keyword">from</span> <span class="keyword">test</span>;</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line">| _c0  |</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line">| 2    |</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">select</span> <span class="keyword">count</span>(<span class="keyword">id</span>) <span class="keyword">from</span> <span class="keyword">test</span>;</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line">| _c0  |</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line">| 2    |</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">describe</span> formatted <span class="keyword">test</span>;</span><br></pre></td></tr></table></figure>

<p><img src="/IT/it-bigdata-hive-simple-query/image-20220508085646467.png" alt="image-20220508085646467"></p>
<h3 id="手动上传文件到-user-hive-warehouse-test"><a href="#手动上传文件到-user-hive-warehouse-test" class="headerlink" title="手动上传文件到/user/hive/warehouse/test"></a>手动上传文件到/user/hive/warehouse/test</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">(base) ➜  hive3 cat from_manual_upload </span><br><span class="line">y</span><br></pre></td></tr></table></figure>

<p><img src="/IT/it-bigdata-hive-simple-query/image-20220508085844122.png" alt="image-20220508085844122"></p>
<h3 id="查看数据-1"><a href="#查看数据-1" class="headerlink" title="查看数据"></a>查看数据</h3><figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">select</span> * <span class="keyword">from</span> <span class="keyword">test</span>;</span><br><span class="line">+<span class="comment">----------+</span></span><br><span class="line">| test.id  |</span><br><span class="line">+<span class="comment">----------+</span></span><br><span class="line">| hello    |</span><br><span class="line">| hello    |</span><br><span class="line">| y        |</span><br><span class="line">+<span class="comment">----------+</span></span><br></pre></td></tr></table></figure>

<h3 id="查看统计行数-1"><a href="#查看统计行数-1" class="headerlink" title="查看统计行数"></a>查看统计行数</h3><blockquote>
<p>注意，数据条数依旧是2</p>
</blockquote>
<figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">select</span> <span class="keyword">count</span>(*) <span class="keyword">from</span> <span class="keyword">test</span>;</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line">| _c0  |</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line">| 2    |</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">select</span> <span class="keyword">count</span>(<span class="keyword">id</span>) <span class="keyword">from</span> <span class="keyword">test</span>;</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line">| _c0  |</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line">| 2    |</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">describe</span> formatted <span class="keyword">test</span>;</span><br></pre></td></tr></table></figure>

<p><img src="/IT/it-bigdata-hive-simple-query/image-20220508085646467.png" alt="image-20220508085646467"></p>
<h3 id="hive-compute-query-using-stats参数"><a href="#hive-compute-query-using-stats参数" class="headerlink" title="hive.compute.query.using.stats参数"></a>hive.compute.query.using.stats参数</h3><blockquote>
<p>set hive.compute.query.using.stats=true;  – 默认值，使用统计信息</p>
<p>这里需要将其设置为false，就会通过计算引擎重新计算</p>
<p>不过metastore 里的统计信息依旧没有更新</p>
</blockquote>
<figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">set</span> hive.compute.query.using.stats=<span class="literal">false</span>;</span><br><span class="line"></span><br><span class="line"><span class="keyword">select</span> <span class="keyword">count</span>(*) <span class="keyword">from</span> <span class="keyword">test</span>;</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line">| _c0  |</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line">| 3    |</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">select</span> <span class="keyword">count</span>(<span class="keyword">id</span>) <span class="keyword">from</span> <span class="keyword">test</span>;</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line">| _c0  |</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line">| 3    |</span><br><span class="line">+<span class="comment">------+</span></span><br></pre></td></tr></table></figure>

<h3 id="停止收集统计信息"><a href="#停止收集统计信息" class="headerlink" title="停止收集统计信息"></a>停止收集统计信息</h3><p>在大数据量时，在写完数据，做收集统计信息这个过程有点耗时，所以有些场景需要将收集统计信息停止掉，后面重新收集统计信息</p>
<blockquote>
<p>set hive.stats.autogather=false;<br>set hive.stats.column.autogather=false;</p>
</blockquote>
<h3 id="重新收集统计信息"><a href="#重新收集统计信息" class="headerlink" title="重新收集统计信息"></a>重新收集统计信息</h3><figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">ANALYZE</span> <span class="keyword">TABLE</span> [db_name.]tablename [<span class="keyword">PARTITION</span>(partcol1[=val1], partcol2[=val2], ...)]  <span class="comment">-- (<span class="doctag">Note:</span> Fully support qualified table name since Hive 1.2.0, see HIVE-10007.)</span></span><br><span class="line">  <span class="keyword">COMPUTE</span> <span class="keyword">STATISTICS</span> </span><br><span class="line">  [<span class="keyword">FOR</span> <span class="keyword">COLUMNS</span>]          <span class="comment">-- (<span class="doctag">Note:</span> Hive 0.10.0 and later.)</span></span><br><span class="line">  [<span class="keyword">CACHE</span> METADATA]       <span class="comment">-- (<span class="doctag">Note:</span> Hive 2.1.0 and later.)</span></span><br><span class="line">  [NOSCAN];</span><br></pre></td></tr></table></figure>

<figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">analyze</span> <span class="keyword">table</span> <span class="keyword">test</span> <span class="keyword">compute</span> <span class="keyword">statistics</span> <span class="keyword">for</span> <span class="keyword">columns</span>;</span><br></pre></td></tr></table></figure>

<figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">select</span> <span class="keyword">count</span>(*) <span class="keyword">from</span> <span class="keyword">test</span>;</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line">| _c0  |</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line">| 3    |</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">select</span> <span class="keyword">count</span>(<span class="keyword">id</span>) <span class="keyword">from</span> <span class="keyword">test</span>;</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line">| _c0  |</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line">| 3    |</span><br><span class="line">+<span class="comment">------+</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">describe</span> formatted <span class="keyword">test</span>;</span><br></pre></td></tr></table></figure>

<blockquote>
<p>注意，此时numFiles &amp; numRows等信息都依旧修正了。</p>
</blockquote>
<p><img src="/IT/it-bigdata-hive-simple-query/image-20220508091532354.png" alt="image-20220508091532354"></p>
<h3 id="Hive-Metastore-表"><a href="#Hive-Metastore-表" class="headerlink" title="Hive Metastore 表"></a>Hive Metastore 表</h3><p>统计信息存储在 <strong>TABLE_PARAMS</strong></p>
<p>例如：</p>
<p><img src="/IT/it-bigdata-hive-simple-query/image-20220508110523658.png" alt="image-20220508110523658"></p>
<h2 id="监控"><a href="#监控" class="headerlink" title="监控"></a>监控</h2><p>hive 默认在10002端口上开启了JMX JVM相关的监控。</p>
<h3 id="hive-metastore"><a href="#hive-metastore" class="headerlink" title="hive metastore"></a>hive metastore</h3><figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">property</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">name</span>&gt;</span>hive.server2.metrics.enabled<span class="tag">&lt;/<span class="name">name</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">value</span>&gt;</span>true<span class="tag">&lt;/<span class="name">value</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">description</span>&gt;</span>Enable metrics on the HiveServer2.<span class="tag">&lt;/<span class="name">description</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">property</span>&gt;</span></span><br></pre></td></tr></table></figure>

<h3 id="hive-server2"><a href="#hive-server2" class="headerlink" title="hive server2"></a>hive server2</h3><figure class="highlight xml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="tag">&lt;<span class="name">property</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">name</span>&gt;</span>hive.metastore.metrics.enabled<span class="tag">&lt;/<span class="name">name</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">value</span>&gt;</span>true<span class="tag">&lt;/<span class="name">value</span>&gt;</span></span><br><span class="line">  <span class="tag">&lt;<span class="name">description</span>&gt;</span>Enable metrics on the metastore.<span class="tag">&lt;/<span class="name">description</span>&gt;</span></span><br><span class="line"><span class="tag">&lt;/<span class="name">property</span>&gt;</span></span><br></pre></td></tr></table></figure>



<p>以上两个设置，在重启服务之后，就可以通过jmx访问到相关的监控指标了。</p>
<h3 id="prometheus"><a href="#prometheus" class="headerlink" title="prometheus"></a>prometheus</h3><h4 id="jmx-exporter"><a href="#jmx-exporter" class="headerlink" title="jmx_exporter"></a>jmx_exporter</h4><ul>
<li><a href="https://github.com/prometheus/jmx_exporter?msclkid=ed1735b3ce9d11ec9d58a39101eb14ab" target="_blank" rel="noopener">https://github.com/prometheus/jmx_exporter?msclkid=ed1735b3ce9d11ec9d58a39101eb14ab</a></li>
<li><a href="https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.16.1/jmx_prometheus_javaagent-0.16.1.jar" target="_blank" rel="noopener">https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.16.1/jmx_prometheus_javaagent-0.16.1.jar</a></li>
</ul>
<h4 id="监控服务配置文件"><a href="#监控服务配置文件" class="headerlink" title="监控服务配置文件"></a>监控服务配置文件</h4><ul>
<li>hive_server2.yml</li>
</ul>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">startDelaySeconds:</span> <span class="number">0</span></span><br><span class="line"><span class="attr">ssl:</span> <span class="literal">false</span></span><br><span class="line"><span class="attr">lowercaseOutputName:</span> <span class="literal">false</span></span><br><span class="line"><span class="attr">lowercaseOutputLabelNames:</span> <span class="literal">false</span></span><br></pre></td></tr></table></figure>

<ul>
<li><p>hive_metastore.yml</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">---</span></span><br><span class="line"><span class="attr">startDelaySeconds:</span> <span class="number">0</span></span><br><span class="line"><span class="attr">ssl:</span> <span class="literal">false</span></span><br><span class="line"><span class="attr">lowercaseOutputName:</span> <span class="literal">false</span></span><br><span class="line"><span class="attr">lowercaseOutputLabelNames:</span> <span class="literal">false</span></span><br></pre></td></tr></table></figure>

</li>
</ul>
<p>例如我这里存放路径如下：</p>
 <img src="/IT/it-bigdata-hive-simple-query/image-20220508154107035.png" alt="image-20220508154107035" style="zoom: 50%;">

<h4 id="hive-env-sh"><a href="#hive-env-sh" class="headerlink" title="hive-env.sh"></a>hive-env.sh</h4><ul>
<li><p>创建</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> <span class="variable">$HIVE_HOME</span>/conf</span><br><span class="line">cp hive-env.sh.template hive-env.sh</span><br></pre></td></tr></table></figure>
</li>
<li><p>配置</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">if</span> [ <span class="string">"<span class="variable">$SERVICE</span>"</span> = <span class="string">"hiveserver2"</span> ] ; <span class="keyword">then</span></span><br><span class="line">HADOOP_CLIENT_OPTS=<span class="string">"<span class="variable">$HADOOP_CLIENT_OPTS</span> -javaagent:/Users/arthur/opt/monitor/prometheus/jmx_prometheus_javaagent-0.16.1.jar=9094:/Users/arthur/opt/monitor/prometheus/hive_server2.yml"</span></span><br><span class="line"><span class="keyword">fi</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> [ <span class="string">"<span class="variable">$SERVICE</span>"</span> = <span class="string">"metastore"</span> ] ; <span class="keyword">then</span></span><br><span class="line">HADOOP_CLIENT_OPTS=<span class="string">"<span class="variable">$HADOOP_CLIENT_OPTS</span> -javaagent:/Users/arthur/opt/monitor/prometheus/jmx_prometheus_javaagent-0.16.1.jar=9093:/Users/arthur/opt/monitor/prometheus/hive_metastore.yml"</span></span><br><span class="line"><span class="keyword">fi</span></span><br></pre></td></tr></table></figure>
</li>
<li><p>整个文件内容如下：</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment"># Licensed to the Apache Software Foundation (ASF) under one</span></span><br><span class="line"><span class="comment"># or more contributor license agreements.  See the NOTICE file</span></span><br><span class="line"><span class="comment"># distributed with this work for additional information</span></span><br><span class="line"><span class="comment"># regarding copyright ownership.  The ASF licenses this file</span></span><br><span class="line"><span class="comment"># to you under the Apache License, Version 2.0 (the</span></span><br><span class="line"><span class="comment"># "License"); you may not use this file except in compliance</span></span><br><span class="line"><span class="comment"># with the License.  You may obtain a copy of the License at</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="comment">#     http://www.apache.org/licenses/LICENSE-2.0</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="comment"># Unless required by applicable law or agreed to in writing, software</span></span><br><span class="line"><span class="comment"># distributed under the License is distributed on an "AS IS" BASIS,</span></span><br><span class="line"><span class="comment"># WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></span><br><span class="line"><span class="comment"># See the License for the specific language governing permissions and</span></span><br><span class="line"><span class="comment"># limitations under the License.</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Set Hive and Hadoop environment variables here. These variables can be used</span></span><br><span class="line"><span class="comment"># to control the execution of Hive. It should be used by admins to configure</span></span><br><span class="line"><span class="comment"># the Hive installation (so that users do not have to set environment variables</span></span><br><span class="line"><span class="comment"># or set command line parameters to get correct behavior).</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="comment"># The hive service being invoked (CLI etc.) is available via the environment</span></span><br><span class="line"><span class="comment"># variable SERVICE</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># Hive Client memory usage can be an issue if a large number of clients</span></span><br><span class="line"><span class="comment"># are running at the same time. The flags below have been useful in </span></span><br><span class="line"><span class="comment"># reducing memory usage:</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="comment"># if [ "$SERVICE" = "cli" ]; then</span></span><br><span class="line"><span class="comment">#   if [ -z "$DEBUG" ]; then</span></span><br><span class="line"><span class="comment">#     export HADOOP_OPTS="$HADOOP_OPTS -XX:NewRatio=12 -Xms10m -XX:MaxHeapFreeRatio=40 -XX:MinHeapFreeRatio=15 -XX:+UseParNewGC -XX:-UseGCOverheadLimit"</span></span><br><span class="line"><span class="comment">#   else</span></span><br><span class="line"><span class="comment">#     export HADOOP_OPTS="$HADOOP_OPTS -XX:NewRatio=12 -Xms10m -XX:MaxHeapFreeRatio=40 -XX:MinHeapFreeRatio=15 -XX:-UseGCOverheadLimit"</span></span><br><span class="line"><span class="comment">#   fi</span></span><br><span class="line"><span class="comment"># fi</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> [ <span class="string">"<span class="variable">$SERVICE</span>"</span> = <span class="string">"hiveserver2"</span> ] ; <span class="keyword">then</span></span><br><span class="line">        HADOOP_CLIENT_OPTS=<span class="string">"<span class="variable">$HADOOP_CLIENT_OPTS</span> -javaagent:/Users/arthur/opt/monitor/prometheus/jmx_prometheus_javaagent-0.16.1.jar=9094:/Users/arthur/opt/monitor/prometheus/hive_server2.yml"</span></span><br><span class="line"><span class="keyword">fi</span></span><br><span class="line"></span><br><span class="line"><span class="keyword">if</span> [ <span class="string">"<span class="variable">$SERVICE</span>"</span> = <span class="string">"metastore"</span> ] ; <span class="keyword">then</span></span><br><span class="line">        HADOOP_CLIENT_OPTS=<span class="string">"<span class="variable">$HADOOP_CLIENT_OPTS</span> -javaagent:/Users/arthur/opt/monitor/prometheus/jmx_prometheus_javaagent-0.16.1.jar=9093:/Users/arthur/opt/monitor/prometheus/hive_metastore.yml"</span></span><br><span class="line"><span class="keyword">fi</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># The heap size of the jvm stared by hive shell script can be controlled via:</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="comment"># export HADOOP_HEAPSIZE=1024</span></span><br><span class="line"><span class="comment">#</span></span><br><span class="line"><span class="comment"># Larger heap size may be required when running queries over large number of files or partitions. </span></span><br><span class="line"><span class="comment"># By default hive shell scripts use a heap size of 256 (MB).  Larger heap size would also be </span></span><br><span class="line"><span class="comment"># appropriate for hive server.</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment"># Set HADOOP_HOME to point to a specific hadoop install directory</span></span><br><span class="line"><span class="comment"># HADOOP_HOME=$&#123;bin&#125;/../../hadoop</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Hive Configuration Directory can be controlled by:</span></span><br><span class="line"><span class="comment"># export HIVE_CONF_DIR=</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># Folder containing extra libraries required for hive compilation/execution can be controlled by:</span></span><br><span class="line"><span class="comment"># export HIVE_AUX_JARS_PATH=</span></span><br></pre></td></tr></table></figure>

<h4 id="prometheus-yml"><a href="#prometheus-yml" class="headerlink" title="prometheus.yml"></a>prometheus.yml</h4><p>我的prometheus使用的是brew安装的，所以此文件在：/usr/local/etc/prometheus.yml</p>
<p>需要将开始配置的hiveserver2 和 metastore配置进来，即配置文件中的 hs2 和 hms。</p>
<figure class="highlight yaml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line"><span class="attr">global:</span></span><br><span class="line">  <span class="attr">scrape_interval:</span> <span class="string">15s</span></span><br><span class="line"></span><br><span class="line"><span class="attr">scrape_configs:</span></span><br><span class="line">  <span class="bullet">-</span> <span class="attr">job_name:</span> <span class="string">"prometheus"</span></span><br><span class="line">    <span class="attr">static_configs:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">targets:</span> <span class="string">["localhost:9090"]</span></span><br><span class="line"></span><br><span class="line">  <span class="bullet">-</span> <span class="attr">job_name:</span> <span class="string">"nifi"</span></span><br><span class="line">    <span class="attr">static_configs:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">targets:</span> <span class="string">["localhost:9092"]</span></span><br><span class="line"></span><br><span class="line">  <span class="bullet">-</span> <span class="attr">job_name:</span> <span class="string">"hs2"</span></span><br><span class="line">    <span class="attr">static_configs:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">targets:</span> <span class="string">["localhost:9094"]</span></span><br><span class="line"></span><br><span class="line">  <span class="bullet">-</span> <span class="attr">job_name:</span> <span class="string">"hms"</span></span><br><span class="line">    <span class="attr">static_configs:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">targets:</span> <span class="string">["localhost:9093"]</span></span><br><span class="line"></span><br><span class="line">  <span class="bullet">-</span> <span class="attr">job_name:</span> <span class="string">"nodes"</span></span><br><span class="line">    <span class="attr">static_configs:</span></span><br><span class="line">    <span class="bullet">-</span> <span class="attr">targets:</span></span><br><span class="line">      <span class="bullet">-</span> <span class="string">localhost:9100</span></span><br></pre></td></tr></table></figure>
</li>
<li><p>重启</p>
<ul>
<li>hive metastore</li>
<li>hive server2</li>
<li>prometheus</li>
</ul>
</li>
<li><p>效果</p>
<ul>
<li><p><a href="http://localhost:9093/metrics" target="_blank" rel="noopener">http://localhost:9093/metrics</a></p>
</li>
<li><p><a href="http://localhost:9094/metrics" target="_blank" rel="noopener">http://localhost:9094/metrics</a></p>
</li>
<li><p><a href="http://localhost:9090" target="_blank" rel="noopener">http://localhost:9090</a></p>
<img src="/IT/it-bigdata-hive-simple-query/image-20220508155048646.png" alt="image-20220508155048646" style="zoom:50%;">
</li>
<li><p>grafana<br>做了一个demo</p>
<p><img src="/IT/it-bigdata-hive-simple-query/image-20220508155247721.png" alt="image-20220508155247721"></p>
</li>
</ul>
</li>
</ul>

    </div>

    
    
    
        

  <div class="followme">
    <p>欢迎关注我的其它发布渠道</p>

    <div class="social-list">

        <div class="social-item">
          <a target="_blank" class="social-link" href="/atom.xml">
            <span class="icon">
              <i class="fa fa-rss"></i>
            </span>

            <span class="label">RSS</span>
          </a>
        </div>
    </div>
  </div>


      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/bigdata/" rel="tag"># bigdata</a>
              <a href="/tags/hive/" rel="tag"># hive</a>
              <a href="/tags/query/" rel="tag"># query</a>
              <a href="/tags/dml/" rel="tag"># dml</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/IT/it-bigdata-hive-installation/" rel="prev" title="hive3 安装">
      <i class="fa fa-chevron-left"></i> hive3 安装
    </a></div>
      <div class="post-nav-item">
    <a href="/IT/it-bigdata-flink-installation/" rel="next" title="Flink安装">
      Flink安装 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#统计信息"><span class="nav-number">1.</span> <span class="nav-text">统计信息</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#创建表"><span class="nav-number">1.1.</span> <span class="nav-text">创建表</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#插入数据"><span class="nav-number">1.2.</span> <span class="nav-text">插入数据</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#查看数据"><span class="nav-number">1.3.</span> <span class="nav-text">查看数据</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#查看统计行数"><span class="nav-number">1.4.</span> <span class="nav-text">查看统计行数</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#手动上传文件到-user-hive-warehouse-test"><span class="nav-number">1.5.</span> <span class="nav-text">手动上传文件到&#x2F;user&#x2F;hive&#x2F;warehouse&#x2F;test</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#查看数据-1"><span class="nav-number">1.6.</span> <span class="nav-text">查看数据</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#查看统计行数-1"><span class="nav-number">1.7.</span> <span class="nav-text">查看统计行数</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#hive-compute-query-using-stats参数"><span class="nav-number">1.8.</span> <span class="nav-text">hive.compute.query.using.stats参数</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#停止收集统计信息"><span class="nav-number">1.9.</span> <span class="nav-text">停止收集统计信息</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#重新收集统计信息"><span class="nav-number">1.10.</span> <span class="nav-text">重新收集统计信息</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Hive-Metastore-表"><span class="nav-number">1.11.</span> <span class="nav-text">Hive Metastore 表</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#监控"><span class="nav-number">2.</span> <span class="nav-text">监控</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#hive-metastore"><span class="nav-number">2.1.</span> <span class="nav-text">hive metastore</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#hive-server2"><span class="nav-number">2.2.</span> <span class="nav-text">hive server2</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#prometheus"><span class="nav-number">2.3.</span> <span class="nav-text">prometheus</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#jmx-exporter"><span class="nav-number">2.3.1.</span> <span class="nav-text">jmx_exporter</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#监控服务配置文件"><span class="nav-number">2.3.2.</span> <span class="nav-text">监控服务配置文件</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#hive-env-sh"><span class="nav-number">2.3.3.</span> <span class="nav-text">hive-env.sh</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#prometheus-yml"><span class="nav-number">2.3.4.</span> <span class="nav-text">prometheus.yml</span></a></li></ol></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="李联友"
      src="/images/header.jpg">
  <p class="site-author-name" itemprop="name">李联友</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">31</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">8</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">25</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <a href="https://github.com/lianyouli" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;lianyouli" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
  </div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2023</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">李联友</span>
</div>
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://mist.theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Mist</a> 强力驱动
  </div>

<script src="/js/jquery.min.js"> </script>

        








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/muse.js"></script>


<script src="/js/next-boot.js"></script>



<script src="/js/code-unfold.js"></script>


  















  

  

</body>
</html>
